From 6e807487205f1dc235e05822aa0f5d61d705bd73 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Tue, 28 Feb 2006 13:10:16 -0700 Subject: [PATCH] [IA64] Misc clean-up and warnings removal. Signed-off-by: Tristan Gingold --- xen/arch/ia64/xen/irq.c | 3 +++ xen/arch/ia64/xen/privop.c | 10 +++++----- xen/arch/ia64/xen/process.c | 14 ++++---------- xen/include/asm-ia64/debugger.h | 2 ++ xen/include/asm-ia64/linux-xen/asm/tlbflush.h | 4 ++++ xen/include/asm-ia64/privop.h | 2 ++ xen/include/asm-ia64/xensystem.h | 1 - 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/xen/arch/ia64/xen/irq.c b/xen/arch/ia64/xen/irq.c index 3e5e2ced08..4ccd8a737a 100644 --- a/xen/arch/ia64/xen/irq.c +++ b/xen/arch/ia64/xen/irq.c @@ -129,7 +129,9 @@ unsigned int __ia64_local_vector_to_irq (ia64_vector vec) } #endif +#ifndef XEN static void register_irq_proc (unsigned int irq); +#endif /* * Special irq handlers. @@ -1492,6 +1494,7 @@ extern void domain_pend_keyboard_interrupt(int irq); irqreturn_t guest_forward_keyboard_input(int irq, void *nada, struct pt_regs *regs) { domain_pend_keyboard_interrupt(irq); + return 0; } void serial_input_init(void) diff --git a/xen/arch/ia64/xen/privop.c b/xen/arch/ia64/xen/privop.c index 6e76a60a98..411bab859e 100644 --- a/xen/arch/ia64/xen/privop.c +++ b/xen/arch/ia64/xen/privop.c @@ -529,7 +529,7 @@ IA64FAULT priv_mov_from_psr(VCPU *vcpu, INST64 inst) Privileged operation decode and dispatch routines **************************************************************************/ -IA64_SLOT_TYPE slot_types[0x20][3] = { +static const IA64_SLOT_TYPE slot_types[0x20][3] = { {M, I, I}, {M, I, I}, {M, I, I}, {M, I, I}, {M, I, ILLEGAL}, {M, I, ILLEGAL}, {ILLEGAL, ILLEGAL, ILLEGAL}, {ILLEGAL, ILLEGAL, ILLEGAL}, @@ -549,7 +549,7 @@ IA64_SLOT_TYPE slot_types[0x20][3] = { // pointer to privileged emulation function typedef IA64FAULT (*PPEFCN)(VCPU *vcpu, INST64 inst); -PPEFCN Mpriv_funcs[64] = { +static const PPEFCN Mpriv_funcs[64] = { priv_mov_to_rr, priv_mov_to_dbr, priv_mov_to_ibr, priv_mov_to_pkr, priv_mov_to_pmc, priv_mov_to_pmd, 0, 0, 0, priv_ptc_l, priv_ptc_g, priv_ptc_ga, @@ -799,7 +799,7 @@ priv_emulate(VCPU *vcpu, REGS *regs, UINT64 isr) #define HYPERPRIVOP_SET_KR 0x12 #define HYPERPRIVOP_MAX 0x12 -char *hyperpriv_str[HYPERPRIVOP_MAX+1] = { +static const char * const hyperpriv_str[HYPERPRIVOP_MAX+1] = { 0, "rfi", "rsm.dt", "ssm.dt", "cover", "itc.d", "itc.i", "ssm.i", "=ivr", "=tpr", "tpr=", "eoi", "itm=", "thash", "ptc.ga", "itr.d", "=rr", "rr=", "kr=" @@ -898,7 +898,7 @@ ia64_hyperprivop(unsigned long iim, REGS *regs) Privileged operation instrumentation routines **************************************************************************/ -char *Mpriv_str[64] = { +static const char * const Mpriv_str[64] = { "mov_to_rr", "mov_to_dbr", "mov_to_ibr", "mov_to_pkr", "mov_to_pmc", "mov_to_pmd", "<0x06>", "<0x07>", "<0x08>", "ptc_l", "ptc_g", "ptc_ga", @@ -918,7 +918,7 @@ char *Mpriv_str[64] = { }; #define RS "Rsvd" -char *cr_str[128] = { +static const char * const cr_str[128] = { "dcr","itm","iva",RS,RS,RS,RS,RS, "pta",RS,RS,RS,RS,RS,RS,RS, "ipsr","isr",RS,"iip","ifa","itir","iipa","ifs", diff --git a/xen/arch/ia64/xen/process.c b/xen/arch/ia64/xen/process.c index ee88991543..e1f10ce49a 100644 --- a/xen/arch/ia64/xen/process.c +++ b/xen/arch/ia64/xen/process.c @@ -228,14 +228,12 @@ unsigned long pending_false_positive = 0; void reflect_extint(struct pt_regs *regs) { -// extern unsigned long vcpu_verbose, privop_trace; unsigned long isr = regs->cr_ipsr & IA64_PSR_RI; struct vcpu *v = current; static int first_extint = 1; if (first_extint) { printf("Delivering first extint to domain: isr=0x%lx, iip=0x%lx\n", isr, regs->cr_iip); - //privop_trace = 1; vcpu_verbose = 1; first_extint = 0; } if (vcpu_timer_pending_early(v)) @@ -339,12 +337,8 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa, { struct pt_regs *regs = (struct pt_regs *) &stack; unsigned long code; -#if 0 - unsigned long error = isr; - int result, sig; -#endif char buf[128]; - static const char *reason[] = { + static const char * const reason[] = { "IA-64 Illegal Operation fault", "IA-64 Privileged Operation fault", "IA-64 Privileged Register fault", @@ -708,9 +702,8 @@ void ia64_handle_privop (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long itir) { IA64FAULT vector; - struct vcpu *v = current; - vector = priv_emulate(v,regs,isr); + vector = priv_emulate(current,regs,isr); if (vector != IA64_NO_FAULT && vector != IA64_RFI_IN_PROGRESS) { // Note: if a path results in a vector to reflect that requires // iha/itir (e.g. vcpu_force_data_miss), they must be set there @@ -764,7 +757,8 @@ ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long i } #endif printf("*** NaT fault... attempting to handle as privop\n"); -printf("isr=0x%lx, ifa=0x%lx, iip=0x%lx, ipsr=0x%lx\n", isr, ifa, regs->cr_iip, psr); +printf("isr=%016lx, ifa=%016lx, iip=%016lx, ipsr=%016lx\n", + isr, ifa, regs->cr_iip, psr); //regs->eml_unat = 0; FIXME: DO WE NEED THIS??? // certain NaT faults are higher priority than privop faults vector = priv_emulate(v,regs,isr); diff --git a/xen/include/asm-ia64/debugger.h b/xen/include/asm-ia64/debugger.h index 50e6475200..9d59159fc6 100644 --- a/xen/include/asm-ia64/debugger.h +++ b/xen/include/asm-ia64/debugger.h @@ -40,6 +40,8 @@ #include +void show_registers(struct cpu_user_regs *regs); + // NOTE: on xen struct pt_regs = struct cpu_user_regs // see include/asm-ia64/linux-xen/asm/ptrace.h #ifdef CRASH_DEBUG diff --git a/xen/include/asm-ia64/linux-xen/asm/tlbflush.h b/xen/include/asm-ia64/linux-xen/asm/tlbflush.h index a53253f8d2..38f7318f6c 100644 --- a/xen/include/asm-ia64/linux-xen/asm/tlbflush.h +++ b/xen/include/asm-ia64/linux-xen/asm/tlbflush.h @@ -103,6 +103,10 @@ flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end */ } + #define flush_tlb_kernel_range(start, end) flush_tlb_all() /* XXX fix me */ +#ifdef XEN +extern void flush_tlb_mask(cpumask_t mask); +#endif #endif /* _ASM_IA64_TLBFLUSH_H */ diff --git a/xen/include/asm-ia64/privop.h b/xen/include/asm-ia64/privop.h index ace012263e..fc22db9ee0 100644 --- a/xen/include/asm-ia64/privop.h +++ b/xen/include/asm-ia64/privop.h @@ -209,4 +209,6 @@ typedef union U_INST64 { extern void privify_memory(void *start, UINT64 len); +extern int ia64_hyperprivop(unsigned long iim, REGS *regs); + #endif diff --git a/xen/include/asm-ia64/xensystem.h b/xen/include/asm-ia64/xensystem.h index d204141fcb..b699454a8b 100644 --- a/xen/include/asm-ia64/xensystem.h +++ b/xen/include/asm-ia64/xensystem.h @@ -78,7 +78,6 @@ extern struct task_struct *vmx_ia64_switch_to (void *next_task); #define __cmpxchg_user(ptr, new, old, _size) \ ({ \ register long __gu_r8 asm ("r8"); \ - register long __gu_r9 asm ("r9"); \ asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ asm volatile ("mov %1=r0;;\n" \ "[1:]\tcmpxchg"_size".acq %0=[%2],%3,ar.ccv\n" \ -- 2.30.2